package cn.iocoder.yudao.module.engine.enums;

import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

import java.util.Arrays;

@ToString
@AllArgsConstructor
public enum EnumActionType implements IntArrayValuable {
    LLM(1, "LLM"),
    TTS(2, "TTS"),
    ;

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(EnumActionType::getType).toArray();

    /**
     * 类型
     */
    private final Integer type;
    /**
     * 名字
     */
    private final String name;

    @Override
    public int[] array() {
        return ARRAYS;
    }

    @JsonValue
    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }
}
